{* Smarty *}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>{$larch_name}: People</title>
  <link rel="stylesheet" href="styles/main.css" type="text/css"/>
  <meta http-equiv="Content-Script-Type" content="text/javascript"/>
</head>
<body>
  <h1 class="title">{$larch_name}</h1>
  <h2 class="subtitle">{$larch_name_subtitle}</h2>

 <form action="{$smarty.server.PHP_SELF}" method="post">
  <table style="text-align: left;">
    <tbody>
      <tr>
        <td>Person identifier</td>
        <td><input type="text" disabled="true" name="id" value="{$id}"/></td>
      </tr>
      <tr>
        <td>Time created</td>
        <td><input type="text" disabled="true" name="time_created"
                   value="{$time_created}"/></td>
      </tr>
      <tr>
        <td>Time modified</td>
        <td><input type="text" disabled="true" name="time_modified"
                   value="{$time_modified}"/></td>
      </tr>
      <tr>
        <td><span class="req">Surname</span></td>
        <td><input type="text" name="surname" value="{$surname}"/></td>
      </tr>
      <tr>
        <td>Given name</td>
        <td><input type="text" name="givenname" value="{$givenname}"/></td>
      </tr>
      <tr>
        <td>E-mail</td>
        <td><input type="text" name="email" value="{$email}"/></td>
      </tr>
      <tr>
        <td>Voice phone</td>
        <td><input type="text" name="voicephone" value="{$voicephone}"/></td>
      </tr>
      <tr>
        <td>Fax phone</td>
        <td><input type="text" name="faxphone" value="{$faxphone}"/></td>
      </tr>
      <tr>
        <td>Institution</td>
        <td>
          <select name="institution_pulldown">
{foreach from=$institution_pulldown key=iid item=iname}
            <option value="{$iid}">{$iname}</option>
{/foreach}
          </select>
        </td>
      </tr>
      <tr>
        <td>Address 1</td>
        <td><input type="text" name="address1" value="{$address1}"/></td>
      </tr>
      <tr>
        <td>Address 2</td>
        <td><input type="text" name="address2" value="{$address2}"/></td>
      </tr>
      <tr>
        <td>City</td>
        <td><input type="text" name="city" value="{$city}"/></td>
      </tr>
      <tr>
        <td>State</td>
        <td><input type="text" name="state" value="{$state}"/></td>
      </tr>
      <tr>
        <td>Postcode</td>
        <td><input type="text" name="postcode" value="{$postcode}"/></td>
      </tr>
      <tr>
        <td><span class="req">Country</span></td>
        <td>
          <select name="country_pulldown">
{foreach from=$country_pulldown key=cid item=cname}
            <!-- The original names are all uppercase. -->
            <!-- FIXME: Recase during database loading, not here. -->
            <option value="{$cid}">{$cname|lower|capitalize}</option>
{/foreach}
          </select>
        </td>
      </tr>
      <tr>
        <!-- FIXME: Rearrange these buttons sensibly. -->
{if $empty_form}
        <td><input type="submit" name="submit" value="Search"/></td>
{if $edit_allowed}
        <td><input type="submit" name="submit" value="New Person"/></td>
        <td><input type="submit" name="submit" value="Save Changes"/></td>
{/if}
        <td><input type="reset" value="Reset"/></td>
{/if}
      </tr>
    </tbody>
  </table>
 </form>

  <p>Go <a href="index.php">home</a>.</p>

{include file='footer.tpl'}
</body>
</html>
